package com.farseer810.service;

import java.util.List;

import com.farseer810.dao.StudentDao;
import com.farseer810.model.Student;

public class StudentService {
	public static final int SORT_CHINESE = 0;
	public static final int SORT_MATH = 1;
	public static final int SORT_ENGLISH = 2;
	public static final int SORT_TOTAL_SCORE = 3;
	
	private StudentService() {
	}
	
	public static void addStudent(Student student) throws Exception {
		StudentDao.addStudent(student);
	}
	
	public static void deleteStudent(Student student) throws Exception {
		StudentDao.deleteStudent(student);
	}
	
	public static void modifyStudent(Student student) throws Exception {
		StudentDao.modifyStudent(student);
	}
	
	public static List<Student> getStudentGradeList(int sortType) throws Exception {
		return StudentDao.getStudentGradeList(sortType);
	}
	
	public static boolean isStudentNumberExist(String number) throws Exception {
		return StudentDao.isStudentNumberExist(number);
	}
}
